package com.csd.utils;

import com.csd.common.JsonBean;
import com.csd.dto.ActionResult;

import javax.xml.crypto.Data;

/**
 * @ Author :lihainan
 * @ ClassNmae :JsonUtils
 * @ Description :TODO
 * @ Date :2020/12/22
 * @ Version 1.0
 */
public class JsonUtils {
    public static JsonBean createJsonBean(int code, Object info){
        JsonBean bean = new JsonBean();
        bean.setCode(code);
        bean.setInfo(info);
        return bean;
    }
    public static ActionResult actionResult(int statusCode,String msg, Object info,int code){
        ActionResult result = new ActionResult();
        result.setCode(statusCode);
        result.setMsg(msg);
        result.setData(info);
        result.setCode(code);
        return result;
    }
}
